<?php 
$server = "localhost";
$username = "root";
$password = "";
$dbname = "account_db";
$mysqli = new mysqli ( $server, $username, $password, $dbname );

echo "<p>索引数组</p>";
$result = $mysqli ->query("select * from account");
while($r=$result->fetch_row()){
	var_dump($r);
	echo "<br/>";
}
$result->free_result();
echo "<p>关联数组</p>";
$result = $mysqli ->query("select * from account");
while($r=$result->fetch_assoc()){
	var_dump ($r);
	echo "<br/>";
}
$result->free_result();
echo "<p>混合数组</p>";
$result = $mysqli ->query("select * from account");
while($r=$result->fetch_array()){
	var_dump ($r);
	echo "<br/>";
}
$result->free_result();
echo "<p>对象</p>";
$result = $mysqli ->query("select * from account");
while($r=$result->fetch_object()){
	var_dump ($r);
	echo "<br/>";
}
$result->free_result();
		?>